<!--
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-11-22 19:02:29
 * @LastEditors: 李天惊 uf_lee@163.com
 * @LastEditTime: 2022-11-28 10:55:34
 * @FilePath: \grazlink20\uc_sys\src\components\VideoPlayer\src\VideoPlayer.vue
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved. 
-->
<script lang="ts" setup>
import { reactive } from 'vue'
// const props = defineProps(['url'])
const props = defineProps({
  // 数据
  url: {
    type: String,
    default: () => ''
  }
})
const data = reactive({
  source: {
    src: props.url,
    type: 'video/mp4'
  },
  options: {
    autoplay: true,
    muted: true,
    controls: true
  }
})
</script>
<template>
  <nut-video :source="data.source" :options="data.options" />
</template>
<!-- <script lang="ts">
import { toRefs, reactive } from 'vue'
export default {
  setup() {
    const state = reactive({
      source: {
        src: 'https://storage.jd.com/about/big-final.mp4?Expires=3730193075&AccessKey=3LoYX1dQWa6ZXzQl&Signature=ViMFjz%2BOkBxS%2FY1rjtUVqbopbJI%3D',
        type: 'video/mp4'
      },
      options: {
        autoplay: true,
        muted: true,
        controls: true
      }
    })

    return { ...toRefs(state) }
  }
}
</script> -->
